package Jaiku::Uid;

use base 'Exporter';

@EXPORT=qw(
    CONTEXT_UID_BLACKBOARDFACTORY
    CONTEXT_UID_SENSORDATAFACTORY
    CONTEXT_UID_CONTEXTSENSORS
    CONTEXT_UID_CONTEXTCONTACTS

    OLD2_CONTEXT_UID_BLACKBOARDFACTORY
    OLD2_CONTEXT_UID_SENSORDATAFACTORY
);


use constant {
    CONTEXT_UID_BLACKBOARDFACTORY => 0x200084BF,
    CONTEXT_UID_SENSORDATAFACTORY => 0x200084C2,
    CONTEXT_UID_CONTEXTSENSORS => 0x200084C1,
    CONTEXT_UID_CONTEXTCONTACTS => 0x200084BB,

    OLD2_CONTEXT_UID_BLACKBOARDFACTORY => 0x20006E4C,
    OLD2_CONTEXT_UID_SENSORDATAFACTORY => 0x20006E4E,
};

sub canon {
    my $uid=shift;

    return CONTEXT_UID_BLACKBOARDFACTORY if ($uid==OLD2_CONTEXT_UID_BLACKBOARDFACTORY);
    return CONTEXT_UID_SENSORDATAFACTORY if ($uid==OLD2_CONTEXT_UID_SENSORDATAFACTORY);

    return $uid;
}

1;
